<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>Nfc Interactor: NfcRecordModel Class Reference</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />

<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>

</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  <td id="projectlogo"><img alt="Logo" src="nfcinteractor80.png"/></td>
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">Nfc Interactor
   &#160;<span id="projectnumber">2.1.0</span>
   </div>
   <div id="projectbrief">Shows all information about NFC tags available through Qt Mobility APIs. Includes reusable convenience classes for handling additional tag types: Smart Poster, Image and vCard.</div>
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.7.5.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
</div>
<div class="header">
  <div class="summary">
<a href="#pub-slots">Public Slots</a> &#124;
<a href="#signals">Signals</a> &#124;
<a href="#pub-methods">Public Member Functions</a>  </div>
  <div class="headertitle">
<div class="title">NfcRecordModel Class Reference</div>  </div>
</div>
<div class="contents">
<!-- doxytag: class="NfcRecordModel" -->
<p>Stores and manages the editable data, which can be transformed to an NDEF message.  
 <a href="class_nfc_record_model.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="nfcrecordmodel_8h_source.html">nfcrecordmodel.h</a>&gt;</code></p>

<p><a href="class_nfc_record_model-members.html">List of all members.</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="pub-slots"></a>
Public Slots</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_nfc_record_model.html#a8a3d19869138110bfbaca719745ba321">addCompleteRecordWithDefault</a> (const int messageTypeInt)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Append the default info for a new message to the record model.  <a href="#a8a3d19869138110bfbaca719745ba321"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_nfc_record_model.html#a3b2511ef6081b874013b2f3a8da8a56f">addRecord</a> (const QString &amp;title, const int messageType, const int recordContent, const QString &amp;currentText, const bool removeVisible, const bool addVisible, const int recordId)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Append a new record item to the model, specifying the data directly and using int variables for type enums (for QML use).  <a href="#a3b2511ef6081b874013b2f3a8da8a56f"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a40aacc282579d101d778ba5749cecdbd"></a><!-- doxytag: member="NfcRecordModel::addRecord" ref="a40aacc282579d101d778ba5749cecdbd" args="(const QString &amp;title, const NfcTypes::MessageType messageType, const NfcTypes::RecordContent recordContent, const QString &amp;currentText, const bool removeVisible, const bool addVisible, const int recordId)" -->
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_nfc_record_model.html#a40aacc282579d101d778ba5749cecdbd">addRecord</a> (const QString &amp;title, const <a class="el" href="class_nfc_types.html#a1ff0384b1733be7e1cb8baaf52ce891f">NfcTypes::MessageType</a> messageType, const <a class="el" href="class_nfc_types.html#ae29245a8a2a4d24dd3de2f9d3db83691">NfcTypes::RecordContent</a> recordContent, const QString &amp;currentText, const bool removeVisible, const bool addVisible, const int recordId)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Append a new record item to the model, specifying the data directly and using enums. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a9cb38de9ed4d45d6b68c25a117ef17b2"></a><!-- doxytag: member="NfcRecordModel::addRecordItem" ref="a9cb38de9ed4d45d6b68c25a117ef17b2" args="(NfcRecordItem *newRecordItem)" -->
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_nfc_record_model.html#a9cb38de9ed4d45d6b68c25a117ef17b2">addRecordItem</a> (<a class="el" href="class_nfc_record_item.html">NfcRecordItem</a> *newRecordItem)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Append a new record item to the model. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a08890d188a01073cb52553243a6a2f70"></a><!-- doxytag: member="NfcRecordModel::insertRecordItem" ref="a08890d188a01073cb52553243a6a2f70" args="(const int row, NfcRecordItem *newRecordItem)" -->
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_nfc_record_model.html#a08890d188a01073cb52553243a6a2f70">insertRecordItem</a> (const int row, <a class="el" href="class_nfc_record_item.html">NfcRecordItem</a> *newRecordItem)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Insert a new record item at a specific position to the model. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_nfc_record_model.html#a1467040cf6c617bd5431a7495c6fbdb7">simpleInsertRecordItem</a> (const int insertPosition, const <a class="el" href="class_nfc_types.html#a1ff0384b1733be7e1cb8baaf52ce891f">NfcTypes::MessageType</a> messageType, const <a class="el" href="class_nfc_types.html#ae29245a8a2a4d24dd3de2f9d3db83691">NfcTypes::RecordContent</a> contentType, const bool removeVisible, const int parentRecordId)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Add a single item to the model using its defaults at the specified position.  <a href="#a1467040cf6c617bd5431a7495c6fbdb7"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a28c345a87023c984234ad1d6f1661ab2"></a><!-- doxytag: member="NfcRecordModel::simpleAppendRecordItem" ref="a28c345a87023c984234ad1d6f1661ab2" args="(const NfcTypes::MessageType messageType, const NfcTypes::RecordContent contentType, const bool removeVisible, const int parentRecordId)" -->
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_nfc_record_model.html#a28c345a87023c984234ad1d6f1661ab2">simpleAppendRecordItem</a> (const <a class="el" href="class_nfc_types.html#a1ff0384b1733be7e1cb8baaf52ce891f">NfcTypes::MessageType</a> messageType, const <a class="el" href="class_nfc_types.html#ae29245a8a2a4d24dd3de2f9d3db83691">NfcTypes::RecordContent</a> contentType, const bool removeVisible, const int parentRecordId)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">append a single item to the model using its defaults at the specified position. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a6ec573dda826ee98180df65fe132d847"></a><!-- doxytag: member="NfcRecordModel::getDefaultsForRecordContent" ref="a6ec573dda826ee98180df65fe132d847" args="(const NfcTypes::MessageType msgType, const NfcTypes::RecordContent contentType, QString &amp;defaultTitle, QString &amp;defaultContents)" -->
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_nfc_record_model.html#a6ec573dda826ee98180df65fe132d847">getDefaultsForRecordContent</a> (const <a class="el" href="class_nfc_types.html#a1ff0384b1733be7e1cb8baaf52ce891f">NfcTypes::MessageType</a> msgType, const <a class="el" href="class_nfc_types.html#ae29245a8a2a4d24dd3de2f9d3db83691">NfcTypes::RecordContent</a> contentType, QString &amp;defaultTitle, QString &amp;defaultContents)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Get default values for a new record item that is part of a specific message type. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QVariantList&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_nfc_record_model.html#a168d6359e59b8b23eec830dd11718bc3">getSelectionItemsForRecordContent</a> (const <a class="el" href="class_nfc_types.html#ae29245a8a2a4d24dd3de2f9d3db83691">NfcTypes::RecordContent</a> contentType, int &amp;defaultSelectedItem)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Get possible selection items for a new record item.  <a href="#a168d6359e59b8b23eec830dd11718bc3"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_nfc_record_model.html#a360f92331b34efa5b4031eedce11a151">addContentToRecord</a> (int recordIndex, int messageTypeInt, int newContentType)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Add a new record item to an existing message, using default types.  <a href="#a360f92331b34efa5b4031eedce11a151"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_nfc_record_model.html#a9ae26a84a75e4a5ef8097463072795ae">isContentInRecord</a> (const int recordIndex, const <a class="el" href="class_nfc_types.html#ae29245a8a2a4d24dd3de2f9d3db83691">NfcTypes::RecordContent</a> searchForRecordContent)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Check if the record UI already contains the specified content item. <em>recordIndex</em> index of the parent record, whose children should be searched <em>searchForRecordContent</em> record content type to check if available in the parent record.  <a href="#a9ae26a84a75e4a5ef8097463072795ae"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_nfc_record_model.html#a3a4c7c93570254cc791f111eabccdef4">isContentInRecord</a> (const int recordIndex, const int searchForRecordContent)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Check if the specified record content item is already part of the message.  <a href="#a3a4c7c93570254cc791f111eabccdef4"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="af0ef2d5de0c206158f110ec3fae42d2b"></a><!-- doxytag: member="NfcRecordModel::removeRecord" ref="af0ef2d5de0c206158f110ec3fae42d2b" args="(const int removeRecordIndex)" -->
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_nfc_record_model.html#af0ef2d5de0c206158f110ec3fae42d2b">removeRecord</a> (const int removeRecordIndex)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Remove the specified record / record content item from the UI. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a3fdfc5f18be01f7b1a4475a8badf3ec4"></a><!-- doxytag: member="NfcRecordModel::findHeaderForIndex" ref="a3fdfc5f18be01f7b1a4475a8badf3ec4" args="(const int recordIndex)" -->
int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_nfc_record_model.html#a3fdfc5f18be01f7b1a4475a8badf3ec4">findHeaderForIndex</a> (const int recordIndex)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Return the model index of the header record item for the given index. If the specified index is already a header, the same index is returned. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a25d6219f1112970fd9ee3afc6adb3742"></a><!-- doxytag: member="NfcRecordModel::nextAvailableRecordId" ref="a25d6219f1112970fd9ee3afc6adb3742" args="()" -->
int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_nfc_record_model.html#a25d6219f1112970fd9ee3afc6adb3742">nextAvailableRecordId</a> ()</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Return the next unused record id that can be used to add a new record to the UI. This method assumes that record ids are sorted, and will return the id of the last item in the model plus 1. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QList&lt; QObject * &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_nfc_record_model.html#a0ae72ff7f61f02010e854a05f6142d34">possibleContentForRecord</a> (int recordIndex)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Return a list of content items that can potentially be added to a record.  <a href="#a0ae72ff7f61f02010e854a05f6142d34"></a><br/></td></tr>
<tr><td colspan="2"><h2><a name="signals"></a>
Signals</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_nfc_record_model.html#a21008add9a7311fd6e92d43c914c0786">recordItemsModified</a> ()</td></tr>
<tr><td colspan="2"><h2><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ab9c45360986047a9806d6b53675f8779"></a><!-- doxytag: member="NfcRecordModel::NfcRecordModel" ref="ab9c45360986047a9806d6b53675f8779" args="(QObject *parent=0)" -->
&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_nfc_record_model.html#ab9c45360986047a9806d6b53675f8779">NfcRecordModel</a> (QObject *parent=0)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructor to create a new record model, whose items can be used to compose and define an NDEF message. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a2f7ca8afc528cda4255b05e880419317"></a><!-- doxytag: member="NfcRecordModel::setNfcStats" ref="a2f7ca8afc528cda4255b05e880419317" args="(NfcStats *nfcStats)" -->
void&#160;</td><td class="memItemRight" valign="bottom"><b>setNfcStats</b> (<a class="el" href="class_nfc_stats.html">NfcStats</a> *nfcStats)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ab9a950c7fb6ac2f67807120db40af4aa"></a><!-- doxytag: member="NfcRecordModel::rowCount" ref="ab9a950c7fb6ac2f67807120db40af4aa" args="(const QModelIndex &amp;parent=QModelIndex()) const " -->
int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_nfc_record_model.html#ab9a950c7fb6ac2f67807120db40af4aa">rowCount</a> (const QModelIndex &amp;parent=QModelIndex()) const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">How many items are present in the record model. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a21071e905a2e5a8fa18bdad68876a991"></a><!-- doxytag: member="NfcRecordModel::data" ref="a21071e905a2e5a8fa18bdad68876a991" args="(const QModelIndex &amp;index, int role) const " -->
QVariant&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_nfc_record_model.html#a21071e905a2e5a8fa18bdad68876a991">data</a> (const QModelIndex &amp;index, int role) const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the appropriate data (specified by the role) from the references item. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a30a2fadcd737bd46d3c41ec3b7c3194e"></a><!-- doxytag: member="NfcRecordModel::flags" ref="a30a2fadcd737bd46d3c41ec3b7c3194e" args="(const QModelIndex &amp;index) const " -->
Qt::ItemFlags&#160;</td><td class="memItemRight" valign="bottom"><b>flags</b> (const QModelIndex &amp;index) const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top">Q_INVOKABLE void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_nfc_record_model.html#aa79ae18e3b5af401fc5140d283f14501">setDataValue</a> (int index, const QVariant &amp;value, const QString &amp;role)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Update data in a specific record item, with parameters of generic types that can be called from QML.  <a href="#aa79ae18e3b5af401fc5140d283f14501"></a><br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="acdb8fbd0ce837abf57cbdb385e885d8f"></a><!-- doxytag: member="NfcRecordModel::setData" ref="acdb8fbd0ce837abf57cbdb385e885d8f" args="(const QModelIndex &amp;index, const QVariant &amp;value, int role=Qt::EditRole)" -->
bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_nfc_record_model.html#acdb8fbd0ce837abf57cbdb385e885d8f">setData</a> (const QModelIndex &amp;index, const QVariant &amp;value, int role=Qt::EditRole)</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Update data in a specific record item. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ae0695fe0faf5713ff6de17b51cc6c87a"></a><!-- doxytag: member="NfcRecordModel::convertToNdefMessage" ref="ae0695fe0faf5713ff6de17b51cc6c87a" args="()" -->
QNdefMessage *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_nfc_record_model.html#ae0695fe0faf5713ff6de17b51cc6c87a">convertToNdefMessage</a> ()</td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Convert all the record items currently stored in the model to a QNdefMessage. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_nfc_record_model.html#af15a558c5cff708daab96872d093e2b2">containsAdvMsg</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ad1e32d3c0f7a8939f5cf4f2a39138665"></a><!-- doxytag: member="NfcRecordModel::indexFromItem" ref="ad1e32d3c0f7a8939f5cf4f2a39138665" args="(const NfcRecordItem *item) const " -->
QModelIndex&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_nfc_record_model.html#ad1e32d3c0f7a8939f5cf4f2a39138665">indexFromItem</a> (const <a class="el" href="class_nfc_record_item.html">NfcRecordItem</a> *item) const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Search for the record <em>item</em> and return its index in the model. <br/></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="abf3347ebfdeb7312d8e921cbdf33a9e7"></a><!-- doxytag: member="NfcRecordModel::size" ref="abf3347ebfdeb7312d8e921cbdf33a9e7" args="() const " -->
int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_nfc_record_model.html#abf3347ebfdeb7312d8e921cbdf33a9e7">size</a> () const </td></tr>
<tr><td class="mdescLeft">&#160;</td><td class="mdescRight">Count how many items are in the record model. <br/></td></tr>
</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><p>Stores and manages the editable data, which can be transformed to an NDEF message. </p>
<p>The record model manages a list of <a class="el" href="class_nfc_record_item.html" title="Individual record item contained in the NfcRecordModel.">NfcRecordItem</a> instances, which define the various details that are combined to create a single NDEF message. The model can also contain data that will end up in several different NDEF records, which are all put together into one NDEF message in the end.</p>
<p>Interaction with the data directly is encapsulated in the <a class="el" href="class_nfc_record_item.html" title="Individual record item contained in the NfcRecordModel.">NfcRecordItem</a>, but this class provides logic to add, remove and query items from the model, as well as tasks that go beyond the responsibilities of a single item - for example, finding which other record items can be added to a record present in the model (e.g., does the Smart Poster already have the optional Action item, or can it still be added?). </p>
</div><hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="a8a3d19869138110bfbaca719745ba321"></a><!-- doxytag: member="NfcRecordModel::addCompleteRecordWithDefault" ref="a8a3d19869138110bfbaca719745ba321" args="(const int messageTypeInt)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void NfcRecordModel::addCompleteRecordWithDefault </td>
          <td>(</td>
          <td class="paramtype">const int&#160;</td>
          <td class="paramname"><em>messageTypeInt</em></td><td>)</td>
          <td><code> [slot]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Append the default info for a new message to the record model. </p>
<p>Depending on the MessageType, this will add one or more record items with their default values to the record model. </p>

</div>
</div>
<a class="anchor" id="a360f92331b34efa5b4031eedce11a151"></a><!-- doxytag: member="NfcRecordModel::addContentToRecord" ref="a360f92331b34efa5b4031eedce11a151" args="(int recordIndex, int messageTypeInt, int newContentType)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void NfcRecordModel::addContentToRecord </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>recordIndex</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>messageTypeInt</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>contentTypeInt</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [slot]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Add a new record item to an existing message, using default types. </p>
<p>Uses int values for specifying the message and content type, so that it can be called from QML.</p>
<p>If adding for example a text, this method will also add the language. </p>

</div>
</div>
<a class="anchor" id="a3b2511ef6081b874013b2f3a8da8a56f"></a><!-- doxytag: member="NfcRecordModel::addRecord" ref="a3b2511ef6081b874013b2f3a8da8a56f" args="(const QString &amp;title, const int messageType, const int recordContent, const QString &amp;currentText, const bool removeVisible, const bool addVisible, const int recordId)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void NfcRecordModel::addRecord </td>
          <td>(</td>
          <td class="paramtype">const QString &amp;&#160;</td>
          <td class="paramname"><em>title</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const int&#160;</td>
          <td class="paramname"><em>messageType</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const int&#160;</td>
          <td class="paramname"><em>recordContent</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const QString &amp;&#160;</td>
          <td class="paramname"><em>currentText</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const bool&#160;</td>
          <td class="paramname"><em>removeVisible</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const bool&#160;</td>
          <td class="paramname"><em>addVisible</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const int&#160;</td>
          <td class="paramname"><em>recordId</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [slot]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Append a new record item to the model, specifying the data directly and using int variables for type enums (for QML use). </p>
<p>Casts the int values to enums and calls the 'real' <a class="el" href="class_nfc_record_model.html#a3b2511ef6081b874013b2f3a8da8a56f" title="Append a new record item to the model, specifying the data directly and using int variables for type ...">addRecord()</a> method. </p>

</div>
</div>
<a class="anchor" id="af15a558c5cff708daab96872d093e2b2"></a><!-- doxytag: member="NfcRecordModel::containsAdvMsg" ref="af15a558c5cff708daab96872d093e2b2" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool NfcRecordModel::containsAdvMsg </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Check if the message currently contained in the model contains an advanced message type. </p>

</div>
</div>
<a class="anchor" id="a168d6359e59b8b23eec830dd11718bc3"></a><!-- doxytag: member="NfcRecordModel::getSelectionItemsForRecordContent" ref="a168d6359e59b8b23eec830dd11718bc3" args="(const NfcTypes::RecordContent contentType, int &amp;defaultSelectedItem)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">QVariantList NfcRecordModel::getSelectionItemsForRecordContent </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="class_nfc_types.html#ae29245a8a2a4d24dd3de2f9d3db83691">NfcTypes::RecordContent</a>&#160;</td>
          <td class="paramname"><em>contentType</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int &amp;&#160;</td>
          <td class="paramname"><em>defaultSelectedItem</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [slot]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Get possible selection items for a new record item. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">contentType</td><td>record content type to get the possible selection items for </td></tr>
    <tr><td class="paramname">defaultSelectedItem</td><td>which item should be selected by default </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a9ae26a84a75e4a5ef8097463072795ae"></a><!-- doxytag: member="NfcRecordModel::isContentInRecord" ref="a9ae26a84a75e4a5ef8097463072795ae" args="(const int recordIndex, const NfcTypes::RecordContent searchForRecordContent)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool NfcRecordModel::isContentInRecord </td>
          <td>(</td>
          <td class="paramtype">const int&#160;</td>
          <td class="paramname"><em>recordIndex</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="class_nfc_types.html#ae29245a8a2a4d24dd3de2f9d3db83691">NfcTypes::RecordContent</a>&#160;</td>
          <td class="paramname"><em>searchForRecordContent</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [slot]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Check if the record UI already contains the specified content item. <em>recordIndex</em> index of the parent record, whose children should be searched <em>searchForRecordContent</em> record content type to check if available in the parent record. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>true if the specified record content type is already present in the parent record. </dd></dl>

</div>
</div>
<a class="anchor" id="a3a4c7c93570254cc791f111eabccdef4"></a><!-- doxytag: member="NfcRecordModel::isContentInRecord" ref="a3a4c7c93570254cc791f111eabccdef4" args="(const int recordIndex, const int searchForRecordContent)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool NfcRecordModel::isContentInRecord </td>
          <td>(</td>
          <td class="paramtype">const int&#160;</td>
          <td class="paramname"><em>recordIndex</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const int&#160;</td>
          <td class="paramname"><em>searchForRecordContent</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [slot]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Check if the specified record content item is already part of the message. </p>
<p>Uses int values instead of enums for compatibility to QML. </p>

</div>
</div>
<a class="anchor" id="a0ae72ff7f61f02010e854a05f6142d34"></a><!-- doxytag: member="NfcRecordModel::possibleContentForRecord" ref="a0ae72ff7f61f02010e854a05f6142d34" args="(int recordIndex)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">QList&lt; QObject * &gt; NfcRecordModel::possibleContentForRecord </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>recordIndex</em></td><td>)</td>
          <td><code> [slot]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Return a list of content items that can potentially be added to a record. </p>
<p>Return a list of record items that can possibly be added to the messageType / NDEF record.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">recordIndex</td><td>index of a header record, which will be searched.</td></tr>
  </table>
  </dd>
</dl>
<p>For example, the custom record can only define the payload once. If it is already present, it should no longer be offered to the user to add the payload record item.</p>
<p>In contrast, a text item can in many cases be added as many times as needed, as Smart Posters support text in different languages, so that the reader can choose which language to show. </p>

</div>
</div>
<a class="anchor" id="a21008add9a7311fd6e92d43c914c0786"></a><!-- doxytag: member="NfcRecordModel::recordItemsModified" ref="a21008add9a7311fd6e92d43c914c0786" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void NfcRecordModel::recordItemsModified </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [signal]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Emitted whenever the model contents have been modified, e.g., by adding, removing or changing a record item. </p>

</div>
</div>
<a class="anchor" id="aa79ae18e3b5af401fc5140d283f14501"></a><!-- doxytag: member="NfcRecordModel::setDataValue" ref="aa79ae18e3b5af401fc5140d283f14501" args="(int index, const QVariant &amp;value, const QString &amp;role)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void NfcRecordModel::setDataValue </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>index</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const QVariant &amp;&#160;</td>
          <td class="paramname"><em>value</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const QString &amp;&#160;</td>
          <td class="paramname"><em>role</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Update data in a specific record item, with parameters of generic types that can be called from QML. </p>
<p>The method needs to have a different name from <a class="el" href="class_nfc_record_model.html#acdb8fbd0ce837abf57cbdb385e885d8f" title="Update data in a specific record item.">setData()</a>, so that the correct version is called from QML. </p>

</div>
</div>
<a class="anchor" id="a1467040cf6c617bd5431a7495c6fbdb7"></a><!-- doxytag: member="NfcRecordModel::simpleInsertRecordItem" ref="a1467040cf6c617bd5431a7495c6fbdb7" args="(const int insertPosition, const NfcTypes::MessageType messageType, const NfcTypes::RecordContent contentType, const bool removeVisible, const int parentRecordId)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void NfcRecordModel::simpleInsertRecordItem </td>
          <td>(</td>
          <td class="paramtype">const int&#160;</td>
          <td class="paramname"><em>insertPosition</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="class_nfc_types.html#a1ff0384b1733be7e1cb8baaf52ce891f">NfcTypes::MessageType</a>&#160;</td>
          <td class="paramname"><em>messageType</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="class_nfc_types.html#ae29245a8a2a4d24dd3de2f9d3db83691">NfcTypes::RecordContent</a>&#160;</td>
          <td class="paramname"><em>contentType</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const bool&#160;</td>
          <td class="paramname"><em>removeVisible</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const int&#160;</td>
          <td class="paramname"><em>parentRecordId</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [slot]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Add a single item to the model using its defaults at the specified position. </p>
<p>Creates and inserts a new record item, using defaults for some of the most common info (remove is visible, add is invisible).</p>
<p>Used by <a class="el" href="class_nfc_record_model.html#a360f92331b34efa5b4031eedce11a151" title="Add a new record item to an existing message, using default types.">addContentToRecord()</a>. </p>

</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li><a class="el" href="nfcrecordmodel_8h_source.html">nfcrecordmodel.h</a></li>
<li>nfcrecordmodel.cpp</li>
</ul>
</div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Properties</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>



<hr class="footer"/><address class="footer"><small>
Generated on Mon Mar 12 2012 13:32:49 for Nfc Interactor by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.7.5.1
</small></address>

</body>
</html>
